home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 751-760 / 753 / zoo / zoosrc.zoo / options.h < prev    next >
C/C++ Source or Header  |  1992-05-02  |  9KB  |  379 lines

  1. /* @(#) options.h 2.22 88/08/24 15:27:36 */
  2.  
  3. /*
  4. The contents of this file are hereby released to the public domain.
  5.                                     -- Rahul Dhesi 1991/07/06
  6.  
  7. For documentation about this file, see options.doc.
  8. */
  9.  
  10. #define ZOO /* always defined */
  11. #define PORTABLE        /* always defined */
  12. #define ZOOCOMMENT    /* always defined */
  13.  
  14.  
  15. /***********************************************************************/
  16. /* SYSTEM V (should be compatible with most releases)                  */
  17. /***********************************************************************/
  18.  
  19. #ifdef SYS_V
  20. #define FILTER
  21. #define IO_MACROS
  22. #define EXISTS(f)    (access(f, 00) == 0)
  23. #define FNLIMIT 14
  24. #define CHEKDIR
  25. #define NIXTIME
  26. #define NIXFNAME
  27. #define NEEDCTYP
  28. #define NOENUM
  29. #define REN_LINK
  30. #define SETBUF
  31. #define GETTZ
  32. #define FATTR
  33. #define T_SIGNAL    void
  34. #define VARARGS
  35. #define NEED_MEMMOVE
  36. /* #define NEED_MEMCPY */
  37. #define T_UINT16        unsigned short /* must be 16 bit unsigned */
  38. #define HAVE_ISATTY
  39. /* #define NEED_VPRINTF */
  40. #endif /* SYS_V */
  41.  
  42. /***********************************************************************/
  43. /* Turbo C++ 1.0 under MS-DOS                                   */
  44. /***********************************************************************/
  45.  
  46. #ifdef TURBOC
  47. #undef PORTABLE
  48. #define ANSI_HDRS
  49. #define USE_ASCII
  50. #define SPECINIT
  51. #define SPECEXIT
  52. #define PURIFY
  53. #define DISK_CH ':'
  54. #define IGNORECASE
  55. #define WILDCARD "*.*"
  56. #define FOLD
  57. #define FORCESLASH
  58. #define FNLIMIT 12
  59. #define CUR_DIR "."
  60. #define PATH_SEP ":/\\"
  61. #define EXT_SEP  ":/\\."
  62. #define SETMODE
  63. /* 0x8000 and 0x4000 taken from <fcntl.h> for Turbo C */
  64. #define MODE_BIN(f)      setmode(fileno(f), 0x8000)
  65. #define MODE_TEXT(f)     setmode(fileno(f), 0x4000)
  66. #define NEED_STDIO
  67. #define ANSI_PROTO
  68. #define VOIDPTR void *
  69. #define REN_STDC
  70. #define STDARG
  71. #define T_UINT16        unsigned short /* must be 16 bit unsigned */
  72. /* #define UNBUF_IO */
  73. /* #define UNBUF_LIMIT    512 */
  74. #define T_SIGNAL void
  75. #define DIRECT_CONVERT
  76. #define STDARG
  77. #define CHECK_BREAK
  78. #define check_break kbhit
  79. #define HAVE_ISATTY
  80. #ifdef    PORTABLE /* for testing only */
  81. # define SPECNEXT
  82. # define NIXTIME
  83. # undef WILDCARD
  84. #endif
  85. #endif /* TURBOC */
  86.  
  87. /***********************************************************************/
  88. /* Older BSD 4.3 and most derivatives                                              */
  89. /***********************************************************************/
  90.  
  91. #ifdef BSD4_3
  92. #define NOSTRCHR /* not really needed for 4.3BSD */
  93. #define FILTER
  94. #define IO_MACROS
  95. #define EXISTS(f)    (access(f, 00) == 0)
  96. #define FNLIMIT 1023
  97. #define CHEKDIR
  98. #define NIXTIME
  99. #define NIXFNAME
  100. #define NEEDCTYP
  101. #define NOENUM
  102. #define REN_STDC
  103. #define SETBUF
  104. #define GETTZ
  105. #define FATTR
  106. #define T_SIGNAL    int
  107. #define VARARGS
  108. #define NEED_MEMMOVE
  109. #define T_UINT16        unsigned short /* must be 16 bit unsigned */
  110. #define HAVE_ISATTY
  111. #define NEED_VPRINTF /* older BSDs only; newer ones have vprintf */
  112. #endif /* BSD4_3 */
  113.  
  114. /*  Ultrix 4.1 */
  115. #ifdef ULTRIX
  116. #define NO_STDIO_FN    /* avoid declaring certain stdio functions */
  117. #define NOSTRCHR /* needed? */
  118. #define FILTER
  119. #define IO_MACROS
  120. #define EXISTS(f)    (access(f, 00) == 0)
  121. #define FNLIMIT 1023
  122. #define CHEKDIR
  123. #define NIXTIME
  124. #define NIXFNAME
  125. #define NEEDCTYP
  126. #define NOENUM
  127. #define REN_STDC
  128. #define SETBUF
  129. #define GETTZ
  130. #define FATTR
  131. #define T_SIGNAL    void
  132. #define VARARGS
  133. #define NEED_MEMMOVE
  134. #define T_UINT16    unsigned short /* must be 16 bit unsigned */
  135. #define HAVE_ISATTY
  136. /* #define NEED_VPRINTF */
  137. #define BSD4_3 /* for I/O definitions */
  138. #endif /* ULTRIX */
  139.  
  140. /***********************************************************************/
  141. /* Newer BSD 4.4 (projected)                                           */
  142. /***********************************************************************/
  143.  
  144. #ifdef BSD4_4
  145. /* #define NOSTRCHR */
  146. #define FILTER
  147. #define IO_MACROS
  148. #define EXISTS(f)    (access(f, 00) == 0)
  149. #define FNLIMIT 1023
  150. #define CHEKDIR
  151. #define NIXTIME
  152. #define NIXFNAME
  153. #define NEEDCTYP
  154. /* #define NOENUM */
  155. #define REN_STDC
  156. #define SETBUF
  157. #define GETTZ
  158. #define FATTR
  159. #define T_SIGNAL    void
  160. /* #define VARARGS */
  161. /* #define NEED_MEMMOVE */
  162. #define T_UINT16        unsigned short /* must be 16 bit unsigned */
  163. #define HAVE_ISATTY
  164. /* #define NEED_VPRINTF */
  165. #endif /* BSD4_4 */
  166.  
  167. /***********************************************************************/
  168. /* VAX/VMS version 5.3 or so                                                          */
  169. /***********************************************************************/
  170.  
  171. #ifdef VMS
  172.  
  173. /*
  174. Select VMS pre-4.6 or later next line. Pre-4.6 library does not have
  175. rename() and memset() so zoo defines its own;  4.6 has these, so we
  176. must use them, else VMS library functions will conflict with our
  177. own.
  178. */
  179. # if 0        /* Make this 1 for VMS version 4.5 or earlier */
  180. #    define NEED_VMS_RENAME    /* used in vms.c */
  181. #    define NEED_MEMSET
  182. # endif
  183. #define REN_STDC
  184. #define IO_MACROS
  185. #define SPEC_WILD
  186. #define EXT_ANYWAY
  187. #define VER_CH ';'
  188. #define SPECEXIT
  189. #define CHEKUDIR
  190. #define FNLIMIT 78
  191. #define DIR_SEP '.'  /* separates dir fields */
  192. #define DISK_CH ':'
  193. #define DIR_LBRACK "[" /* left bracketing symbol dir dir name */
  194. #define PATH_CH "]"
  195. #define PATH_SEP ":]"
  196. #define EXT_SEP ":]."
  197. #define CUR_DIR "."
  198. #define NIXTIME
  199. #define NEEDCTYP
  200. #define NOENUM
  201. #define IGNORECASE
  202. #define SPECMOD
  203. #define SPECNEXT
  204. #define WILDCARD "*.*"
  205. #define FOLD
  206. #define NO_STDIO_FN
  207. #define T_SIGNAL    void
  208. #define T_UINT16        unsigned short /* must be 16 bit unsigned */
  209. #define VARARGS
  210. #endif /* VMS */
  211.  
  212. /***********************************************************************/
  213. /* AMIGA: DICE or AZTEC C 3.6                                                   */
  214. /***********************************************************************/
  215.  
  216. #ifdef MCH_AMIGA
  217. #define DISK_CH ':'
  218. #define SPECNEXT
  219. /*#define WILDCARD "*"*/
  220. #define IGNORECASE
  221. #define FNLIMIT 30
  222. #define NEEDCTYP
  223. #define CUR_DIR "."
  224. #define PATH_SEP ":/"
  225. #define EXT_SEP  ":/."
  226. #define REN_STDC
  227. /*#define NOENUM*/
  228. /*#define SETBUF*/
  229. #define CHEKUDIR
  230. #define GETUTIME
  231. #define NIXTIME
  232. #define T_UINT16        unsigned short /* must be 16 bit unsigned */
  233. #define T_INT16 short int
  234. #define FATTR
  235. #define FATTR_NAME
  236. #ifdef __STDC__
  237. # define LINT_ARGS                            /* old but still used */
  238. # define ANSI_PROTO
  239. # define ANSI_HDRS
  240. # define MORE     ...
  241. # define STDARG
  242. #else
  243. # define VARARGS
  244. #endif
  245. #define NOTHING void
  246. #define VOIDPTR void *
  247. #define T_SIGNAL void
  248. #define SPECINIT
  249. #define SPECEXIT
  250. /* FAST_EXT requires changes to zooext.c, zooadd*.c, zoo.h;
  251.  * ifndef PORTABLE becomes ifdef FAST_EXT in many cases
  252.  */
  253. #define FAST_EXT
  254. #ifndef __STDC__
  255. # define NEED_MEMCPY
  256. # define NEED_MEMSET
  257. # define NEED_MEMMOVE
  258. # define NEED_VPRINTF
  259. #endif
  260. #ifdef AZTEC_C
  261. # define NEED_SIGNAL /* These SIGNAL defines are related */
  262. # define CHECK_BREAK
  263. # define check_break Chk_Abort
  264. # ifndef SIGINT
  265. #    define SIGINT            1
  266. # endif /* ndef SIGINT */
  267. #endif /* def AZTEC_C */
  268. #endif /* def MCH_AMIGA */
  269.  
  270. /***********************************************************************/
  271. /* GENERIC **IX SYSTEM -- GOOD STARTING POINT FOR YOURS     */
  272. /***********************************************************************/
  273.  
  274. #ifdef GENERIC
  275. /* #define SPECNEXT */
  276. /* #define IGNORECASE */
  277. #define FNLIMIT 14
  278. #define NEEDCTYP
  279. #define CUR_DIR "."
  280. #define PATH_SEP "/"
  281. #define EXT_SEP  "/."
  282. /* #define NOSIGNAL */
  283. /* REN_LINK is UNIX-specific.  Can't find a generic rename() function */
  284. #define REN_LINK
  285. #define NOENUM
  286. /* #define SETBUF */
  287. #define CHEKDIR
  288. #define NIXTIME
  289. #define HAVE_ISATTY
  290. #define NEED_MEMMOVE
  291. #endif /* GENERIC */
  292.  
  293.  
  294. /***********************************************************************/
  295. /* REST OF THIS FILE SHOULD NOT NEED ANY CHANGES                              */
  296. /***********************************************************************/
  297.  
  298. /***********************************************************************/
  299. /*  Common filename conventions for **IX systems                              */
  300. /***********************************************************************/
  301.  
  302. #ifdef NIXFNAME
  303. #define CUR_DIR "."
  304. #define PATH_SEP "/"
  305. #define EXT_CH '.'
  306. #define EXT_SEP  "/."
  307. #define EXT_DFLT ".zoo"
  308. #endif
  309.  
  310. /* Compensate for strchr/index differences */
  311. #ifdef NOSTRCHR
  312. #define strchr index
  313. #define strrchr rindex
  314. #endif
  315.  
  316. /* let non-**IX lints under **IX work (see makefile) */
  317. #ifdef CROSS_LINT
  318. # undef ANSI_HDRS
  319. # undef ANSI_PROTO
  320. # ifdef STDARG
  321. #    undef STDARG
  322. #    define VARARGS
  323. # endif /* STDARG */
  324. #endif
  325.  
  326. /* assume certain defaults */
  327. #ifndef VOIDPTR
  328. # define VOIDPTR     char *
  329. #endif
  330.  
  331. #ifndef VER_DISPLAY
  332. # define VER_DISPLAY ";"
  333. #endif
  334. #ifndef VER_INPUT
  335. # define VER_INPUT ":;"
  336. #endif
  337. #ifndef PATH_CH
  338. # define PATH_CH "/"
  339. #endif
  340. #ifndef EXT_CH
  341. # define EXT_CH '.'
  342. #endif
  343. #ifndef EXT_DFLT
  344. # define EXT_DFLT ".zoo"
  345. #endif
  346.  
  347. #ifndef STDARG
  348. # ifndef VARARGS
  349. #    define VARARGS
  350. # endif
  351. #endif
  352.  
  353. #ifndef T_SIGNAL
  354. # define T_SIGNAL int
  355. #endif
  356.  
  357. #ifdef STDARG
  358. # ifdef VARARGS
  359. # include "DO NOT DEFINE BOTH STDARG AND VARARGS"
  360. # endif
  361. #endif
  362.  
  363. /* We supply a default for T_UINT16 if it is not defined.  But this
  364. value is critical, so we compile in a runtime check. */
  365.  
  366. #ifndef T_UINT16
  367. # define T_UINT16 unsigned short
  368. # define CHECK_TUINT /* will do runtime check for correct size */
  369. #endif
  370.  
  371. /* ANSI compatibility in declarations -- see zoofns.h for usage */
  372. #ifndef PARMS
  373. # ifdef ANSI_PROTO
  374. #    define PARMS(x)      x
  375. # else
  376. #    define PARMS(x)      ()
  377. # endif
  378. #endif
  379.